<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title>购物车</title>
		<%
			String basePath = request.getScheme()
					+"://"
					+request.getServerName()
					+":"
					+request.getServerPort()
					+request.getContextPath()
					+"/";
		%>
		<base href="<%=basePath%>">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="phone/css/mui.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="phone/css/iconfont.css">
		<style type="text/css">
			.diy-caregorize-list{
				width: 30%;
				height: 13rem;
				position: absolute;
				top: 7%;
			}
			.diy-meun-list{
				width: 70%;
				height: 13rem;
				position: absolute;
				top: 7%;
				left: 31%;
			}
			.mui-row.mui-fullscreen>[class*="mui-col-"] {
				height: 100%;
			}
			
			.mui-col-xs-3,
			.mui-col-xs-9 {
				overflow-y: auto;
				height: 100%;
			}
			
			.mui-segmented-control .mui-control-item {
				line-height: 50px;
				width: 100%;
			}
			
			.mui-control-content {
				display: block;
			}
			
			.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
				background-color: #fff;
				
			}
			.mui-popover {
				height: 300px;
			}
			.icon {
			  width: 1em;
			  height: 1em;
			  vertical-align: -0.15em;
			  fill: currentColor;
			  overflow: hidden;
			  }
		</style>
	</head>

	<body>
		<script src="phone/js/jquery-3.3.1.min.js"></script>
		<script src="phone/js/mui.js"></script>
		<script src="phone/js/div.js"></script>
		<script src="phone/js/iconfont.js"></script>
		<!-- 头部开始 -->
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">购物车</h1>
		</header>
		<!-- 头部结束 -->
		<!-- 选项卡开始 -->

		<!-- 选项卡结束 -->
		<div class="mui-content">
		<div>
			<font size="3" color=""style="float: left;">已选商品</font>
			<font size="" color="gray"style="float: right;"><a href="#"style="color: grey;">清空购物车</a></font>
		</div>
		<svg class="icon" aria-hidden="true"style="float: right;">
		  <use xlink:href="#icon-diancan"></use>
		</svg>
		<br>
		<ul class="mui-table-view">
		<c:forEach items="${sessionScope.cart.items}" var="entry">
			<li class="mui-table-view-cell mui-media">
				<a href="javascript:;">
					<img class="mui-media-object mui-pull-left" src="">
					<div class="mui-numbox  mui-pull-right" data-numbox-min='1'  data-numbox-max='9'>
						<button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
						<input class="mui-input-numbox" type="number" value="${entry.value.quantities}" style="display: inline-block;"/>
						<button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
					</div>
					<div class="mui-media-body">
						<font size="" color="">${entry.value.foodName}</font><br>
						<font size="" color="">￥:${entry.value.total}</font>
					</div>

				</a>
			</li>
		</c:forEach>
		</ul>
			<button id="slider" type="button" class="mui-btn mui-btn-blue mui-pull-right" style="background-color: #F0AD4E;border: #EC971F;margin-right: 1%;">准备付款</button>
			<button id="total" type="button" class="mui-btn mui-btn-blue mui-pull-right" style="background-color: #F0AD4E;border: #EC971F;margin-right: 1%;">总计：${sessionScope.cart.cartTotal}</button>

		</div>
<%--		<nav class="mui-bar mui-bar-tab">--%>
<%--			<a class="mui-tab-item mui-active" href="phone/index.jsp">--%>
<%--				<span class="mui-icon mui-icon-home"></span>--%>
<%--				<span class="mui-tab-label">首页</span>--%>
<%--			</a>--%>
<%--			<a class="mui-tab-item" href="addCartServlet?action=list">--%>
<%--				<span class="mui-icon mui-icon-more"></span>--%>
<%--				<span class="mui-tab-label">点餐</span>--%>
<%--			</a>--%>
<%--			<a class="mui-tab-item" href="phone/unpackage/mine.jsp">--%>
<%--				<span class="mui-icon mui-icon-contact"></span>--%>
<%--				<span class="mui-tab-label">我的</span>--%>
<%--			</a>--%>
<%--		</nav>--%>
		<script type="text/javascript">

			mui.init()
		</script>
	</body>

</html>
